package com.starhub.application.model.enums;

/*
 * 模型类型
 */
public enum ChatTypeEnums {
    OpenaiGpt("openai_gpt", ChatProviderEnums.OpenAI, "GPT"),
    Claude("claude", ChatProviderEnums.Anthropic, "Claude"),
    Qwen("qwen", ChatProviderEnums.Alibaba, "Qwen"),
    Wenxinyiyan("wenxinyiyan", ChatProviderEnums.Baidu, "文心一言"),
    Xinghuo("xinghuo", ChatProviderEnums.ByteDance, "星火"),
    Deepseek("deepseek", ChatProviderEnums.Deepseek, "deepseek"),
    DeepseekChat("deepseek-chat", ChatProviderEnums.Deepseek, "deepseek-chat"),
    Doubao("doubao", ChatProviderEnums.ByteDance, "字节跳动"),
    open_ollama("ollama", ChatProviderEnums.starHub, "ollama"),
    open_llm("llm", ChatProviderEnums.starHub, "vllm"),
    custom("custom",ChatProviderEnums.Custom,"自定义");
    ;

    private String modelType;
    private ChatProviderEnums chatProvider;
    private String desc;

    ChatTypeEnums(String modelType, ChatProviderEnums chatProvider,String desc) {
        this.modelType = modelType;
        this.chatProvider = chatProvider;
        this.desc = desc;
    }

    public String getModelType() {
        return modelType;
    }

    public String getDesc() {
        return desc;
    }

    public ChatProviderEnums getChatProvider() {
        return chatProvider;
    }

    public static ChatTypeEnums getModelType(String type){
        for(ChatTypeEnums item : ChatTypeEnums.values()){
            if(item.getModelType().equals(type)) {
                return item;
            }
        }
        return ChatTypeEnums.OpenaiGpt;
    }
}
